﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAAC.DTO;
using SAAC.DAL;

namespace SAAC.BLL
{
    public class MonitoriaBLL
    {
        protected MonitoriaDAL _monitoriaDAL;

        public MonitoriaBLL()
        {
            if (_monitoriaDAL == null)
                _monitoriaDAL = new MonitoriaDAL();
        }

        public MonitoriaDTO Select(MonitoriaDTO dto, string order = null)
        {
            try
            {
                return _monitoriaDAL.Select(dto, order);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<MonitoriaDTO> SelectAll(MonitoriaDTO dto, string order = null, int limit = 1000)
        {
            try
            {
                return _monitoriaDAL.SelectAll(dto, order, limit);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Insert(MonitoriaDTO dto)
        {
            try
            {
                _monitoriaDAL.Insert(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Update(MonitoriaDTO dto)
        {
            try
            {
                _monitoriaDAL.Update(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Delete(MonitoriaDTO dto)
        {
            try
            {
                _monitoriaDAL.Delete(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
